Skip to content

feat(consumer-saas): add sidebar layout, theme switcher, and projects dashboard#5

Merged
ScientiaCapital merged 2 commits into
mainfrom
feature/consumer-saas
Nov 29, 2025
Merged

feat(consumer-saas): add sidebar layout, theme switcher, and projects dashboard#5
ScientiaCapital merged 2 commits into
mainfrom
feature/consumer-saas

Conversation

@ScientiaCapital
Copy link
Copy Markdown
Owner

@ScientiaCapital ScientiaCapital commented Nov 29, 2025

Summary

Transform AI Development Cockpit into a consumer-friendly SaaS with a polished sidebar-based layout (Claude Code style) that makes it accessible for family members to build apps using plain English.

Key Features

  • Sidebar Layout: Collapsible sidebar with project navigation, Claude Code inspired design
  • Dual Theme System: Arcade (green terminal aesthetic) and Enterprise (blue professional) themes with localStorage persistence
  • Projects Dashboard: Quick actions grid with "New Project", "Continue Last", "Import from GitHub", "Browse Templates"
  • Project Management: Full CRUD operations via Supabase with RLS policies
  • GitHub Integration: Repository selector component ready for OAuth integration

Files Changed (20 files, +1,998 lines)

  • Layout Components: SidebarLayout, Sidebar, TopBar, ThemeSwitcher, UserMenu
  • Dashboard: QuickActions component with action cards
  • Projects: ProjectCard, ProjectList, CreateProjectModal, RepoSelector
  • Services: ProjectsService for Supabase CRUD operations
  • Database: Migration file for projects and project_builds tables

Theme CSS Variables

  • Arcade: Bright green (#00ff00) terminal aesthetic with dark background
  • Enterprise: Professional blue (#3b82f6) with light background

Test Plan

  • Both themes render correctly (verified with Playwright)
  • Sidebar collapses/expands properly
  • Theme preference persists in localStorage
  • Dashboard page loads without redirect
  • Run Supabase migration to enable project persistence
  • Test GitHub OAuth flow with repo selector

Screenshots

Themes were visually verified during development (Arcade green, Enterprise blue).


🤖 Generated with Claude Code

Greptile Overview

Greptile Summary

This PR introduces a consumer-friendly SaaS interface for the AI Development Cockpit with a Claude Code-inspired sidebar layout.

  • Layout Architecture: New (app) route group with SidebarLayout, TopBar, collapsible Sidebar, and UserMenu components
  • Theme System: Dual theme support (Arcade green terminal, Enterprise blue professional) with localStorage persistence and CSS variable-based styling
  • Projects Dashboard: Quick actions grid with cards for creating projects, continuing last work, importing from GitHub, and browsing templates
  • Project Management: Full CRUD operations via ProjectsService with Supabase integration
  • Database Schema: New projects and project_builds tables with proper RLS policies and indexes
  • GitHub Integration: RepoSelector component ready for OAuth repository selection (currently placeholder implementation)

Issues Found:

  • Duplicate SidebarLayout wrapper in src/app/page.tsx that will cause nested sidebars since the route group layout already provides this
  • Minor React hook dependency warnings in useEffect calls

Confidence Score: 4/5

  • This PR is safe to merge with one minor issue to address regarding duplicate layout wrapping.
  • Well-structured implementation of sidebar layout and theme system. One logic issue with duplicate SidebarLayout wrapper in src/app/page.tsx that could cause nested sidebars. All other components follow good patterns with proper error handling, loading states, and TypeScript typing. Database migration is properly designed with RLS policies.
  • src/app/page.tsx - has duplicate SidebarLayout wrapper that conflicts with route group layout

Important Files Changed

File Analysis

Filename Score Overview
src/app/(app)/layout.tsx 5/5 Clean app layout that wraps children in SidebarLayout for route group-based layout handling.
src/app/(app)/page.tsx 4/5 Dashboard page with welcome message and quick actions. Has unused showCreateModal state that isn't connected to any UI trigger.
src/app/(app)/projects/[id]/page.tsx 4/5 Project detail page with build history. Has missing dependency in useEffect (loadProject function reference).
src/app/page.tsx 3/5 Root page with duplicate SidebarLayout wrapping - redundant since (app)/layout.tsx already provides this.
src/components/layout/SidebarLayout.tsx 5/5 Main layout wrapper with sidebar toggle functionality and proper flex layout structure.
src/components/projects/RepoSelector.tsx 4/5 GitHub repo selector with dropdown. Has incomplete useEffect dependencies and placeholder loadRepos implementation.
src/services/projects/ProjectsService.ts 5/5 Clean Supabase CRUD service for projects with proper error handling and authentication checks.
supabase/migrations/20251129_projects_table.sql 5/5 Database migration with proper RLS policies, indexes, and trigger for updated_at timestamps.

Sequence Diagram

sequenceDiagram
    participant User
    participant Dashboard as Dashboard Page
    participant Sidebar
    participant ProjectsService
    participant Supabase
    participant ThemeSwitcher

    User->>Dashboard: Navigate to /
    Dashboard->>Sidebar: Render SidebarLayout
    Sidebar->>ProjectsService: listProjects()
    ProjectsService->>Supabase: SELECT * FROM projects
    Supabase-->>ProjectsService: projects[]
    ProjectsService-->>Sidebar: projects[]
    Sidebar-->>Dashboard: Render ProjectList

    User->>ThemeSwitcher: Toggle theme
    ThemeSwitcher->>ThemeSwitcher: applyTheme()
    ThemeSwitcher->>ThemeSwitcher: localStorage.setItem()

    User->>Dashboard: Click "New Project"
    Dashboard->>Dashboard: Open CreateProjectModal
    User->>Dashboard: Submit form
    Dashboard->>ProjectsService: createProject()
    ProjectsService->>Supabase: INSERT INTO projects
    Supabase-->>ProjectsService: project
    ProjectsService-->>Dashboard: project
    Dashboard->>User: Navigate to /projects/{id}
Loading

ScientiaCapital and others added 2 commits November 29, 2025 16:49
Design for sidebar layout (Claude Code style), theme system,
GitHub integration, and Supabase projects storage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
… dashboard

Implements Claude Code-style sidebar layout for consumer SaaS transformation:

Layout Components:
- SidebarLayout.tsx - Main app layout with collapsible sidebar
- Sidebar.tsx - Project list with status indicators and filters
- TopBar.tsx - Logo, repo selector, theme toggle, user menu
- ThemeSwitcher.tsx - Arcade (green terminal) / Enterprise (blue) themes
- UserMenu.tsx - Avatar dropdown with profile/settings/logout

Theme System:
- Arcade theme: Terminal green (#00ff00) on black background
- Enterprise theme: Professional blue (#3b82f6) with light/dark variants
- CSS variables in globals.css for seamless theme switching
- localStorage persistence for instant theme application

Projects Feature:
- ProjectsService.ts - CRUD operations via Supabase
- ProjectList.tsx / ProjectCard.tsx - Sidebar project display
- RepoSelector.tsx - GitHub repo dropdown in top bar
- CreateProjectModal.tsx - New project creation form
- Supabase migration for projects and project_builds tables

Dashboard:
- QuickActions.tsx - New Project, Continue Last, Import, Templates
- Dashboard page with welcome message and recent activity

Routing:
- Updated middleware to show dashboard instead of redirect to /chat
- App Router route groups prepared for (app) and (auth) layouts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
ai-development-cockpit Error Error Nov 29, 2025 11:08pm

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

21 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment thread src/app/page.tsx
'there'

return (
<SidebarLayout>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Duplicate SidebarLayout wrapper. The (app)/layout.tsx route group already wraps children in SidebarLayout, so this page (which should be served from the (app) route group) will have nested sidebars. Consider removing this wrapper since the layout handles it.

Suggested change
<SidebarLayout>
<div className="p-6">
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/page.tsx
Line: 27:27

Comment:
**logic:** Duplicate `SidebarLayout` wrapper. The `(app)/layout.tsx` route group already wraps children in `SidebarLayout`, so this page (which should be served from the `(app)` route group) will have nested sidebars. Consider removing this wrapper since the layout handles it.

```suggestion
      <div className="p-6">
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +29 to +31
useEffect(() => {
loadProject()
}, [projectId])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: React hook useEffect has a missing dependency. The loadProject function should either be added to dependencies or wrapped in useCallback.

Suggested change
useEffect(() => {
loadProject()
}, [projectId])
useEffect(() => {
loadProject()
}, [projectId]) // eslint-disable-line react-hooks/exhaustive-deps
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/app/(app)/projects/[id]/page.tsx
Line: 29:31

Comment:
**style:** React hook `useEffect` has a missing dependency. The `loadProject` function should either be added to dependencies or wrapped in `useCallback`.

```suggestion
  useEffect(() => {
    loadProject()
  }, [projectId]) // eslint-disable-line react-hooks/exhaustive-deps
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +27 to +31
useEffect(() => {
if (isGitHubConnected && dropdownOpen && repos.length === 0) {
loadRepos()
}
}, [isGitHubConnected, dropdownOpen])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: The useEffect has missing dependencies: repos.length and loadRepos. This can cause stale closure issues. Also, the loadRepos function is never called since repos is always empty.

Suggested change
useEffect(() => {
if (isGitHubConnected && dropdownOpen && repos.length === 0) {
loadRepos()
}
}, [isGitHubConnected, dropdownOpen])
useEffect(() => {
if (isGitHubConnected && dropdownOpen && repos.length === 0) {
loadRepos()
}
}, [isGitHubConnected, dropdownOpen, repos.length])
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/projects/RepoSelector.tsx
Line: 27:31

Comment:
**style:** The `useEffect` has missing dependencies: `repos.length` and `loadRepos`. This can cause stale closure issues. Also, the `loadRepos` function is never called since `repos` is always empty.

```suggestion
  useEffect(() => {
    if (isGitHubConnected && dropdownOpen && repos.length === 0) {
      loadRepos()
    }
  }, [isGitHubConnected, dropdownOpen, repos.length])
```

How can I resolve this? If you propose a fix, please make it concise.

@ScientiaCapital ScientiaCapital merged commit c6f400e into main Nov 29, 2025
28 of 46 checks passed
ScientiaCapital added a commit that referenced this pull request Jan 18, 2026
… dashboard (#5)

* docs: add consumer SaaS design document

Design for sidebar layout (Claude Code style), theme system,
GitHub integration, and Supabase projects storage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(consumer-saas): add sidebar layout, theme switcher, and projects dashboard

Implements Claude Code-style sidebar layout for consumer SaaS transformation:

Layout Components:
- SidebarLayout.tsx - Main app layout with collapsible sidebar
- Sidebar.tsx - Project list with status indicators and filters
- TopBar.tsx - Logo, repo selector, theme toggle, user menu
- ThemeSwitcher.tsx - Arcade (green terminal) / Enterprise (blue) themes
- UserMenu.tsx - Avatar dropdown with profile/settings/logout

Theme System:
- Arcade theme: Terminal green (#00ff00) on black background
- Enterprise theme: Professional blue (#3b82f6) with light/dark variants
- CSS variables in globals.css for seamless theme switching
- localStorage persistence for instant theme application

Projects Feature:
- ProjectsService.ts - CRUD operations via Supabase
- ProjectList.tsx / ProjectCard.tsx - Sidebar project display
- RepoSelector.tsx - GitHub repo dropdown in top bar
- CreateProjectModal.tsx - New project creation form
- Supabase migration for projects and project_builds tables

Dashboard:
- QuickActions.tsx - New Project, Continue Last, Import, Templates
- Dashboard page with welcome message and recent activity

Routing:
- Updated middleware to show dashboard instead of redirect to /chat
- App Router route groups prepared for (app) and (auth) layouts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant